<template>
  <div class="wrapper wrapper-content animated fadeInRight v-cloak" v-cloak>
    <div class="row">
      <div class="ibox float-e-margins">
        <div class="form ibox-content">
          <div class=" col-md-12">
            <div class="col-md-6">
              <div class="clearfix "></div>
              <div class="form-group">
                <label class="control-label">操作类型：</label>
                <div class="col-md-12 form-control">
                  {{item.type}}
                </div>
              </div>
              <div class="form-group">
                <label class="control-label">操作描述：</label>
                <div class="col-md-12 form-control">
                  {{item.memo}}
                </div>
              </div>

              <div class="form-group">
                <label class="control-label">操作时间：</label>
                <div class="col-md-12 form-control">
                  {{item.dateCreated | date('yyyy-MM-dd HH:mm:ss')}}
                </div>
              </div>
              <div class="form-group">
                <label class="control-label">操作人姓名：</label>
                <div class="col-md-12 form-control">
                  {{item.createName}}({{item.createId}})
                </div>
              </div>
              <div class="form-group">
                <label class="control-label">操作人IP：</label>
                <div class="col-md-12 form-control">
                  {{item.createIp}}
                </div>
              </div>
            </div>
            <div class="col-md-12">
              <div class="form-group">
                <label class="control-label">对象信息：</label>
                <div class="col-md-12 form-control" style="width: 100%;height: 200px;">
                  <textarea disabled readonly style="width: 100%;height: 180px;border: 0;background: #ffffff;" v-html="item.detailInfo">                                </textarea>
                </div>
              </div>
            </div>
            <div class="clearfix "></div>
            <div class="col-md-12" style="height: 50px;margin-top: 50px;">
              <div style="width: 200px; margin: 0 auto;text-align: center;">
                <a @click="lbox.closeMyBoxLayer()" class="btn btn-danger"  href="javascript:">返回</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
  import '@/assets/css/style.css'

  import axios from 'axios'
  import {$storage, apiUtil, site} from '@/assets/js/boss'
  export default {
    data() {
      return {
        item: {}
      }
    },
    mounted() {
      let that = window.$vueApp = this;
      document.getElementsByTagName('body')[0].className = 'fixed-sidebar full-height-layout';
      that.staff.init(() => {
        if (apiUtil.existSessionKey(site.logOperation.info)) {
          axios.post(site.logOperation.info + $storage.getItem(site.logOperation.info), {}).then(function (response) {
            const result = response.data;
            if (result.code === 0) {
              that.item = result.data;
            } else {
              alert(result.message);
            }
          });
        }
      });
    },
    methods: {}
  }
</script>
